﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Microsoft.Extensions.Hosting;

namespace MathTutorPro.Data.Entities
{
    public class ChatGroup
    {
        public int Id { get; set; }

        public string GroupName { get; set; }
        
        public string CreateUserId { get; set; }
        public AppUser CreateUser { get; set; }

        public DateTime CreateTime { get; set; } = DateTime.Now;

        public int? ClassId { get; set; }

        public string? DescText { get; set; }

        public bool IsActive { get; set; } = false;

        public bool IsDelete { get; set; } = false;

        // 导航属性
        //[NotMapped]
        public ICollection<ChatGroupMember> Members { get; set; } = new List<ChatGroupMember>();
        //[NotMapped]
        public ICollection<ChatGroupMessage> Messages { get; set; } = new List<ChatGroupMessage>();
        //public virtual ICollection<ChatGroupMember> Members { get; set; }
        //public virtual ICollection<ChatGroupMessage> Messages { get; set; }
    }
}
